
import request from '@/utils/request';
import { exportFile } from '@/services/global'
import { TableListParams } from './data';

// 获取列表数据
export async function queryRule(params?: TableListParams) {
  return request('/v1/vehicle/type', {
    params,
  });
}
/**
 * @description: 导出excel
 * @param {params} 查询条件
 * @return: Promise
 */

export function exportOrderLog(params: any) {
  return new Promise(function (resolve, reject) {
   exportFile(params, '/v1/orderlog/excel', '运输事件')
      .then((response: any) => {
        resolve(response)
      })
      .catch(e => {
        reject(e)
      })
  })
}

// 订单管理模板下载
export function templateCopy() {
  return request(`/v1/order/files`, {
    method: 'get'
  })
}